<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Javascript 获取 input:file 路径</title>
</head>

<body>
	<div style="display: none;" class="block">
		<div class="subnav">
			<ul class="nav nav-pills">
				<li><a href="#sec_fileload">File Load</a></li>
				<li><a href="#sec_loadhistory">File Load History</a></li>
			</ul>
		</div>
		<div class="block_content" id="block_content"
			style="height: 420px; overflow-y: auto; position: relative;">
			<div class="sections">
				<section id="sec_fileload">
				<div class="page-header-h2">
					<h2>File Load</h2>
				</div>
				<div class="row">
					<div id="container_fileload" class="ph_container">
						<div>
							<h2>
								<small>Filter Items</small>
							</h2>
							<form class="form-horizontal formtastic">
								<div class="row">
									<div class="span5">
										<div class="string control-group stringish field-type">
											<label class="control-label" for="type">File Type</label>
											<div class="controls">
												<select name="type" class="ui-widget-content ui-corner-all"
													id="type"><option value="IAA">Issue Asset
														Add</option>
													<option value="IAC">Issue Asset Change</option>
													<option value="IAD">Issue Asset Drop</option></select>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
									<div class="span5">
										<div class="string control-group stringish field-priority">
											<label class="control-label" for="priority">Prority</label>
											<div class="controls">
												<select name="priority"
													class="ui-widget-content ui-corner-all" id="priority"><option
														value=""></option>
													<option value="1">HIGH</option>
													<option value="2">MEDIUM</option>
													<option value="3">LOW</option></select>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="span5">
										<div class="string control-group stringish field-file">
											<label class="control-label" for="file"></label>
											<div class="controls">
												<div class="row">
													<div class="span5">
														<span
															class="btn fileinput-button btn btn-small btn-primary fileinput-button">
															<i class="icon-plus icon-white"></i> <span>Add
																Files...</span> <input name="upload" multiple="" type="file">
														</span>
													</div>
													<div class="span5">
														<span style="color: red"><b>NOTE:</b> Files to be
															uploaded <br>must be saved in <b>.csv</b> format</span>
													</div>
												</div>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
									<div class="span5">
										<div class="string control-group stringish field-progress">
											<label class="control-label" for="progress"></label>
											<div class="controls">
												<div id="progress" class="span3 fileupload-progress fade"
													align="left">
													<div
														class="progress progress-success progress-striped active"
														role="progressbar" aria-valuemin="0" aria-valuemax="100">
														<div class="bar" style="width: 100%;"></div>
													</div>
												</div>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
								</div>
							</form>
						</div>
						<div class="table-sep"></div>
						<div class="table-caption">Files Loaded</div>
						<table class="table table-striped" style="width: 863px;">
							<thead>
								<tr>
									<th style="" data-field="type">File Type <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="filename">File Name <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="status">Status <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="destination">File Destination <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="size">Size(Bytes) <i
										class="js-sort-sprite"></i></th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td colname="type" coltype="">Issue Asset Add</td>
									<td colname="filename" coltype="">GSI_APP-20120911-070556.csv</td>
									<td colname="status" coltype="">SUBMITTED</td>
									<td colname="destination" coltype="">/upload</td>
									<td colname="size" coltype="">1536</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				</section>
				<section id="sec_loadhistory">
				<div class="page-header-h2">
					<h2>File Load History</h2>
				</div>
				<div class="row">
					<div id="container_loadhistory" class="ph_container">
						<div>
							<h2>
								<small>Filter Items</small>
							</h2>
							<form class="form-horizontal formtastic">
								<div class="row">
									<div class="span5">
										<div class="string control-group stringish field-createdate">
											<label class="control-label" for="createdate">Create
												Date</label>
											<div class="controls">
												<div id="createdate" class="bbf-date">
													<select data-type="date" class="bbf-date"
														style="width: 4em"><option value="1">1</option>
														<option value="2">2</option>
														<option value="3">3</option>
														<option value="4">4</option>
														<option value="5">5</option>
														<option value="6">6</option>
														<option value="7">7</option>
														<option value="8">8</option>
														<option value="9">9</option>
														<option value="10">10</option>
														<option value="11">11</option>
														<option value="12">12</option>
														<option value="13">13</option>
														<option value="14">14</option>
														<option value="15">15</option>
														<option value="16">16</option>
														<option value="17">17</option>
														<option value="18">18</option>
														<option value="19">19</option>
														<option value="20">20</option>
														<option value="21">21</option>
														<option value="22">22</option>
														<option value="23">23</option>
														<option value="24">24</option>
														<option value="25">25</option>
														<option value="26">26</option>
														<option value="27">27</option>
														<option value="28">28</option>
														<option value="29">29</option>
														<option value="30">30</option>
														<option value="31">31</option></select> <select data-type="month"
														class="bbf-month" style="width: 4em"><option
															value="JAN">JAN</option>
														<option value="FEB">FEB</option>
														<option value="MAR">MAR</option>
														<option value="APR">APR</option>
														<option value="MAY">MAY</option>
														<option value="JUN">JUN</option>
														<option value="JUL">JUL</option>
														<option value="AUG">AUG</option>
														<option value="SEP">SEP</option>
														<option value="OCT">OCT</option>
														<option value="NOV">NOV</option>
														<option value="DEC">DEC</option></select> <select data-type="year"
														class="bbf-year" style="width: 4em"><option
															value="1912">1912</option>
														<option value="1913">1913</option>
														<option value="1914">1914</option>
														<option value="1915">1915</option>
														<option value="1916">1916</option>
														<option value="1917">1917</option>
														<option value="1918">1918</option>
														<option value="1919">1919</option>
														<option value="1920">1920</option>
														<option value="1921">1921</option>
														<option value="1922">1922</option>
														<option value="1923">1923</option>
														<option value="1924">1924</option>
														<option value="1925">1925</option>
														<option value="1926">1926</option>
														<option value="1927">1927</option>
														<option value="1928">1928</option>
														<option value="1929">1929</option>
														<option value="1930">1930</option>
														<option value="1931">1931</option>
														<option value="1932">1932</option>
														<option value="1933">1933</option>
														<option value="1934">1934</option>
														<option value="1935">1935</option>
														<option value="1936">1936</option>
														<option value="1937">1937</option>
														<option value="1938">1938</option>
														<option value="1939">1939</option>
														<option value="1940">1940</option>
														<option value="1941">1941</option>
														<option value="1942">1942</option>
														<option value="1943">1943</option>
														<option value="1944">1944</option>
														<option value="1945">1945</option>
														<option value="1946">1946</option>
														<option value="1947">1947</option>
														<option value="1948">1948</option>
														<option value="1949">1949</option>
														<option value="1950">1950</option>
														<option value="1951">1951</option>
														<option value="1952">1952</option>
														<option value="1953">1953</option>
														<option value="1954">1954</option>
														<option value="1955">1955</option>
														<option value="1956">1956</option>
														<option value="1957">1957</option>
														<option value="1958">1958</option>
														<option value="1959">1959</option>
														<option value="1960">1960</option>
														<option value="1961">1961</option>
														<option value="1962">1962</option>
														<option value="1963">1963</option>
														<option value="1964">1964</option>
														<option value="1965">1965</option>
														<option value="1966">1966</option>
														<option value="1967">1967</option>
														<option value="1968">1968</option>
														<option value="1969">1969</option>
														<option value="1970">1970</option>
														<option value="1971">1971</option>
														<option value="1972">1972</option>
														<option value="1973">1973</option>
														<option value="1974">1974</option>
														<option value="1975">1975</option>
														<option value="1976">1976</option>
														<option value="1977">1977</option>
														<option value="1978">1978</option>
														<option value="1979">1979</option>
														<option value="1980">1980</option>
														<option value="1981">1981</option>
														<option value="1982">1982</option>
														<option value="1983">1983</option>
														<option value="1984">1984</option>
														<option value="1985">1985</option>
														<option value="1986">1986</option>
														<option value="1987">1987</option>
														<option value="1988">1988</option>
														<option value="1989">1989</option>
														<option value="1990">1990</option>
														<option value="1991">1991</option>
														<option value="1992">1992</option>
														<option value="1993">1993</option>
														<option value="1994">1994</option>
														<option value="1995">1995</option>
														<option value="1996">1996</option>
														<option value="1997">1997</option>
														<option value="1998">1998</option>
														<option value="1999">1999</option>
														<option value="2000">2000</option>
														<option value="2001">2001</option>
														<option value="2002">2002</option>
														<option value="2003">2003</option>
														<option value="2004">2004</option>
														<option value="2005">2005</option>
														<option value="2006">2006</option>
														<option value="2007">2007</option>
														<option value="2008">2008</option>
														<option value="2009">2009</option>
														<option value="2010">2010</option>
														<option value="2011">2011</option>
														<option value="2012">2012</option>
														<option value="2013">2013</option>
														<option value="2014">2014</option>
														<option value="2015">2015</option>
														<option value="2016">2016</option>
														<option value="2017">2017</option>
														<option value="2018">2018</option>
														<option value="2019">2019</option>
														<option value="2020">2020</option></select> <input
														name="createdate" type="hidden">
												</div>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
									<div class="span5">
										<div class="string control-group stringish field-modifydate">
											<label class="control-label" for="modifydate">Modify
												Date</label>
											<div class="controls">
												<div id="modifydate" class="bbf-date">
													<select data-type="date" class="bbf-date"
														style="width: 4em"><option value="1">1</option>
														<option value="2">2</option>
														<option value="3">3</option>
														<option value="4">4</option>
														<option value="5">5</option>
														<option value="6">6</option>
														<option value="7">7</option>
														<option value="8">8</option>
														<option value="9">9</option>
														<option value="10">10</option>
														<option value="11">11</option>
														<option value="12">12</option>
														<option value="13">13</option>
														<option value="14">14</option>
														<option value="15">15</option>
														<option value="16">16</option>
														<option value="17">17</option>
														<option value="18">18</option>
														<option value="19">19</option>
														<option value="20">20</option>
														<option value="21">21</option>
														<option value="22">22</option>
														<option value="23">23</option>
														<option value="24">24</option>
														<option value="25">25</option>
														<option value="26">26</option>
														<option value="27">27</option>
														<option value="28">28</option>
														<option value="29">29</option>
														<option value="30">30</option>
														<option value="31">31</option></select> <select data-type="month"
														class="bbf-month" style="width: 4em"><option
															value="JAN">JAN</option>
														<option value="FEB">FEB</option>
														<option value="MAR">MAR</option>
														<option value="APR">APR</option>
														<option value="MAY">MAY</option>
														<option value="JUN">JUN</option>
														<option value="JUL">JUL</option>
														<option value="AUG">AUG</option>
														<option value="SEP">SEP</option>
														<option value="OCT">OCT</option>
														<option value="NOV">NOV</option>
														<option value="DEC">DEC</option></select> <select data-type="year"
														class="bbf-year" style="width: 4em"><option
															value="1912">1912</option>
														<option value="1913">1913</option>
														<option value="1914">1914</option>
														<option value="1915">1915</option>
														<option value="1916">1916</option>
														<option value="1917">1917</option>
														<option value="1918">1918</option>
														<option value="1919">1919</option>
														<option value="1920">1920</option>
														<option value="1921">1921</option>
														<option value="1922">1922</option>
														<option value="1923">1923</option>
														<option value="1924">1924</option>
														<option value="1925">1925</option>
														<option value="1926">1926</option>
														<option value="1927">1927</option>
														<option value="1928">1928</option>
														<option value="1929">1929</option>
														<option value="1930">1930</option>
														<option value="1931">1931</option>
														<option value="1932">1932</option>
														<option value="1933">1933</option>
														<option value="1934">1934</option>
														<option value="1935">1935</option>
														<option value="1936">1936</option>
														<option value="1937">1937</option>
														<option value="1938">1938</option>
														<option value="1939">1939</option>
														<option value="1940">1940</option>
														<option value="1941">1941</option>
														<option value="1942">1942</option>
														<option value="1943">1943</option>
														<option value="1944">1944</option>
														<option value="1945">1945</option>
														<option value="1946">1946</option>
														<option value="1947">1947</option>
														<option value="1948">1948</option>
														<option value="1949">1949</option>
														<option value="1950">1950</option>
														<option value="1951">1951</option>
														<option value="1952">1952</option>
														<option value="1953">1953</option>
														<option value="1954">1954</option>
														<option value="1955">1955</option>
														<option value="1956">1956</option>
														<option value="1957">1957</option>
														<option value="1958">1958</option>
														<option value="1959">1959</option>
														<option value="1960">1960</option>
														<option value="1961">1961</option>
														<option value="1962">1962</option>
														<option value="1963">1963</option>
														<option value="1964">1964</option>
														<option value="1965">1965</option>
														<option value="1966">1966</option>
														<option value="1967">1967</option>
														<option value="1968">1968</option>
														<option value="1969">1969</option>
														<option value="1970">1970</option>
														<option value="1971">1971</option>
														<option value="1972">1972</option>
														<option value="1973">1973</option>
														<option value="1974">1974</option>
														<option value="1975">1975</option>
														<option value="1976">1976</option>
														<option value="1977">1977</option>
														<option value="1978">1978</option>
														<option value="1979">1979</option>
														<option value="1980">1980</option>
														<option value="1981">1981</option>
														<option value="1982">1982</option>
														<option value="1983">1983</option>
														<option value="1984">1984</option>
														<option value="1985">1985</option>
														<option value="1986">1986</option>
														<option value="1987">1987</option>
														<option value="1988">1988</option>
														<option value="1989">1989</option>
														<option value="1990">1990</option>
														<option value="1991">1991</option>
														<option value="1992">1992</option>
														<option value="1993">1993</option>
														<option value="1994">1994</option>
														<option value="1995">1995</option>
														<option value="1996">1996</option>
														<option value="1997">1997</option>
														<option value="1998">1998</option>
														<option value="1999">1999</option>
														<option value="2000">2000</option>
														<option value="2001">2001</option>
														<option value="2002">2002</option>
														<option value="2003">2003</option>
														<option value="2004">2004</option>
														<option value="2005">2005</option>
														<option value="2006">2006</option>
														<option value="2007">2007</option>
														<option value="2008">2008</option>
														<option value="2009">2009</option>
														<option value="2010">2010</option>
														<option value="2011">2011</option>
														<option value="2012">2012</option>
														<option value="2013">2013</option>
														<option value="2014">2014</option>
														<option value="2015">2015</option>
														<option value="2016">2016</option>
														<option value="2017">2017</option>
														<option value="2018">2018</option>
														<option value="2019">2019</option>
														<option value="2020">2020</option></select> <input
														name="modifydate" type="hidden">
												</div>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="span5">
										<div class="string control-group stringish field-createby">
											<label class="control-label" for="createby">Create By</label>
											<div class="controls">
												<input name="createby" id="createby" type="text">
													<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
									<div class="span5">
										<div
											class="string control-group stringish field-prioritySearch">
											<label class="control-label" for="prioritySearch">Prority</label>
											<div class="controls">
												<select name="prioritySearch"
													class="ui-widget-content ui-corner-all" id="prioritySearch"><option>1</option>
													<option>2</option>
													<option>3</option></select>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="span5">
										<div class="string control-group stringish field-btnFHSearch">
											<label class="control-label" for="btnFHSearch"></label>
											<div class="controls">
												<button type="button" class="btn btn btn-small btn-primary"
													id="btnFHSearch">
													<i class="icon-search icon-white"></i> <span>Search</span>
												</button>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
									<div class="span5">
										<div class="string control-group stringish field-btnFHReset">
											<label class="control-label" for="btnFHReset"></label>
											<div class="controls">
												<button type="reset" class="btn btn btn-small btn-primary"
													id="btnFHReset">
													<i class="icon-ban-circle icon-white"></i> <span>Clear
														Search</span>
												</button>
												<div class="help-block" style="display: none;"></div>
											</div>
										</div>
									</div>
								</div>
							</form>
						</div>
						<div class="table-sep"></div>
						<div class="table-caption">Files Previously Loaded By User</div>
						<table class="table table-striped" style="width: 863px;">
							<thead>
								<tr>
									<th style="" data-field="nda_id">File ID <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="file_name">File Name <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="type">File Type <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="status">Status <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="create_date">Create Date <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="modify_date">Modify Date <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="create_by">Create By <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="modify_by">Modify By <i
										class="js-sort-sprite"></i></th>
									<th style="" data-field="priority">Priority <i
										class="js-sort-sprite"></i></th>
								</tr>
							</thead>
							<tbody>
								<tr class="js-emptyrow">
									<td colspan="9" style="text-align: center">No Rows to
										Display</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				</section>
			</div>
		</div>
	</div>



	<script type="text/javascript">
var fso, tf; 
fso = new ActiveXObject("Scripting.FileSystemObject"); 
// 创建新文件 
tf = fso.CreateTextFile("c:\\testfile.txt", true); 
// 填写数据，并增加换行符 
tf.WriteLine("Testing 1, 2, 3.") ; 
// 增加3个空行 
tf.WriteBlankLines(3) ; 
// 填写一行，不带换行符 
tf.Write ("This is a test."); 

var path = tf.Path;

// 关闭文件 
tf.Close(); 

</script>
</body>
<!-- 
<form id="fileupload">\
				<div class="row">\
					<div class="span3">\
						<div class="string control-group stringish field-type">\
							<label for="type" class="control-label">File Type</label>\
							<div class="controls">\
								<select id="type" class="ui-widget-content ui-corner-all" name="type">\
									<option value="IAA">Issue Asset Add</option>\
									<option value="IAC">Issue Asset Change</option>\
									<option value="IAD">Issue Asset Drop</option>\
								</select>\
								<div style="display: none;" class="help-block"></div>\
							</div>\
						</div>\
					</div>\
					<div class="span3">\
						<div class="string control-group stringish field-priority">\
							<label for="priority" class="control-label">Prority</label>\
							<div class="controls">\
								<select id="priority" class="ui-widget-content ui-corner-all" name="priority" style="width: 10px">\
									<option>1</option>\
									<option>2</option>\
									<option>3</option>\
								</select>\
								<div style="display: none;" class="help-block"></div>\
							</div>\
						</div>\
					</div>\
					<div class="span4">\
						<div class="string control-group stringish field-file">\
							<label for="file" class="control-label"></label>\
							<div class="controls">\
								<div class="span5">\
									<span class="btn fileinput-button btn btn-small btn-primary fileinput-button">\
										<i class="icon-plus icon-white"></i> <span>Add Files...</span> <input type="file" multiple="" name="upload">\
									</span>\
									<div class="span3 fileupload-progress fade" id="progress">\
										<div aria-valuemax="100" aria-valuemin="0" role="progressbar" class="progress progress-success progress-striped active">\
											<div style="width: 100%;" class="bar"></div>\
										</div>\
									</div>\
								</div>\
								<div style="display: none;" class="help-block"></div>\
							</div>\
						</div>\
					</div>\
				</div>\
			</form>\
 -->

</html>